<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Visit &middot; California</title>

    <link href="bootstrap/css/bootstrap.css" rel="stylesheet">
     <link href="css/visitcali.css" rel="stylesheet">
    <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
  </head>
  <body>
    <div class="container">

      <div class="masthead">
        <h1 class="muted">VisitCali.com
	<?php
	//Session a mettre en place
	$user_id = 0;
	$isAdmin = true;
	 session_start();
	if (isset($_SESSION['email']))
	{
	  if (isset($_SESSION['admin'])) {
	     echo ('<a href="html/user.php"  style="margin:5px" class="btn btn-primary btn-medium pull-right">User Administration</a>');
	  }
	  echo ('<a href="logout_user.php" style="margin:5px" class="btn btn-primary btn-medium pull-right">Sign-out</a><small style="margin:10px;font-size:0.5em"class="pull-right">'.$_SESSION['email'].'</small>');
	} else {
	  echo ('<a href="#modalSignUp" data-toggle="modal" style="margin:5px" class="btn btn-primary btn-medium pull-right">Sign up</a>');
	  echo ('<a href="#modalLogIn" data-toggle="modal" style="margin:5px" class="btn btn-primary btn-medium pull-right">Log in</a>');
	}
	?>
	</h1>
	<img src="img/widescreenBanner1.jpg" alt="smiley face"/>
        <div class="navbar">
          <div class="navbar-inner">
            <div class="container">
              <ul class="nav">
                <li class="active"><a href="index.php">Home</a></li>
                <li><a href="html/places.php">Places to visit</a></li>
                <li><a href="html/dos-donts.php">Do's and don'ts</a></li>
                <li><a href="html/faq.php">FAQ</a></li>
                <li><a href="html/about.php">About us</a></li>
              </ul>
            </div>
          </div>
        </div>
      </div>

      <!-- Jumbotron -->
      <div class="jumbotron">
	
        <h1>Home</h1>
      </div>
		<div class="well">
				<div id="rotatingPics">
					<img src="img/places/Palomar_2 (640x426).jpg" alt="tmp"/>
					<img src="img/places/Palomar_3 (640x426).jpg" alt="tmp"/>
					<img src="img/places/Torrey_1 (640x422).jpg" alt="tmp"/>
					<img src="img/places/Torrey_2 (640x426).jpg" alt="tmp"/>
					<img src="img/places/Safari_3 (640x426).jpg" alt="tmp"/>
			</div>
			<br/>
			<p style="text-align: left">
			You are planning a trip to southern California and have no idea where to go? 
			What to do and what not to do? You are wondering where the hot spots and great places are?
			</p>
			<p style="text-align: left">
			This site will help you to find all you are searching for when this is your 
			first trip to southern California!
			</p>
			<p style="text-align: left">
			You will find several sights and famous places with descriptions, 
			pictures and comments of people who were there but also insider tips 
			and advice for the behavior in this area. 
			You can read about and see pictures of experiences of others, 
			share you own adventures or just connect to people interested in southern California.
			</p>
			<p style="text-align: left">
			You can ask questions about the “contact” function or look at our FAQ’s.
			</p>
			<p style="text-align: left">
			The page is made for foreigners and also for Americans who want to visit California, 
			especially the San Diego area. It helps people planning their trip and deciding where to go during their stay. 
			It might answer many questions they may have before the trip and is a perfect platform to read 
			about other experiences as well as for sharing your own.
			</p>
		</div>
       
        <!-- <a class="btn btn-large btn-success" href="#">Get started today</a> -->
      
      <hr>
	 <div id="modalLogIn" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h3>Log in:</h3>
          </div>
           <form action="login_user.php" method="post">
          <div class="modal-body">
	    <input class="span3" type="email" name="email" placeholder="E-mail" /><br />
	    <input class="span3" type="password" name="password" placeholder="Password" /><br />
              <input class="btn" type="submit" name="submit" value="Submit" />
          </form>
          </div>
          <div class="modal-footer">
            <a href="#" data-dismiss="modal" aria-hidden="true" class="btn">Close</a>
          </div>
        </div>
	
	
    <div id="modalSignUp" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h3>Create a account:</h3>
          </div>
           <form action="add_user.php" method="post">
          <div class="modal-body">
            <input class="span3" type="text" name="firstname" placeholder="Firstname" /><br />
	    <input class="span3" type="text" name="lastname" placeholder="Lastname" /><br />
	    <input class="span3" type="email" name="email" placeholder="E-mail" /><br />
	    <input class="span3" type="password" name="password" placeholder="Password" /><br />
	    <input class="span3" type="text" name="dob" placeholder="Date of Birth AAAA-MM-JJ" /><br />
              <input class="btn" type="submit" name="submit" value="Submit" />
          </form>
          </div>
          <div class="modal-footer">
            <a href="#" data-dismiss="modal" aria-hidden="true" class="btn">Close</a>
          </div>
        </div>
    
      <div class="footer">
        <p>&copy; CSUSM 2013 [CIS 444]</p>
      </div>
      </div>

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/carr.js"></script>
    <script src="bootstrap/js/jquery.js"></script>
    <script src="bootstrap/js/bootstrap-modal.js"></script>

  </body>
</html>
